﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace SindSaude
{
    public partial class Carrossel : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SindSaudeCamadas.Dados.Noticias noticia = new SindSaudeCamadas.Dados.Noticias();
            DataTable dt = new DataTable();
            dt = noticia.carregaNoticiaCarrocel();
            if (dt.Rows.Count >= 1)
            {

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    dt.Rows[i]["strSub_Nome"] = dt.Rows[i]["strSub_Nome"].ToString().Length > 90 ? dt.Rows[i]["strSub_Nome"].ToString().Substring(0, 90) : dt.Rows[i]["strSub_Nome"].ToString();                   
                }
                rpt_Imagens.DataSource = dt;
                rpt_Imagens.DataBind();
                
            }

        }
    }
}